﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <style>

        p {
            text-align:center;
        }

        A {
            color: #666;
        }

            A.current {
                color: #000;
            }

        IMG {
            display: block;
            border: #CCC 1px solid;
            background: #F0F0F0;
            padding: 11px;
            margin-bottom: 50px;
        }

        H1 {
            text-transform: capitalize;
        }

        #displayer {
            text-align: center;
        }

        #chapterList {
            display: none;
            background-color: #A9D0F5;
            color: #000;
            width: 40%;
            height: auto;
            max-height: 400px;
            position: absolute;
            top: 190px;
            left: 400px;
            overflow: scroll;
            border: 2px dashed #000;
            padding: 7px;
            font: bold 13px arial;
        }

        #menu {
            display: none;
            background-color: #FF4000;
            width: 30%;
            height: 30px;
            position: absolute;
            top: 0px;
            left: 475px;
            border: 0px;
            border-bottom: 1px dashed #000;
            padding: 7px;
            text-align: center;
            font: bold 15px Garamond;
        }

        .nav {
            font-size: 20px;
            font-family: Garamond;
            display: block;
        }

        a.nava, a.nava:hover {
            font-size: 20px;
            font-family: Garamond;
        }
    </style>
    <script language="javascript">
        var src; var chapterList; var index = -1;
        var slider, glider, delay, glideDistance; var km = { fkey: 67, skey: 81 };
        var kc = { fkey: 77, skey: 87 }; var kn = { fkey: 78, skey: 82 };
        var kv = { fkey: 86, skey: 69 }; var ks = { fkey: 83, skey: -1 };

        function display(txt) {
            var parser; var xmlDoc = document.createElement("div");
            xmlDoc.innerHTML = txt; src = xmlDoc; index = -1; buildChapterList(); displayNextChapter();
        }


        function buildChapterList() {
            chapterList = "Press " + String.fromCharCode(kc.fkey) + " again to close this panel.</br>";

            for (var i = 0; i < src.childNodes.length; i++) {
                if (i == index) chapterList += "<a class='current' href='javascript:void(0);' onclick='toggleChapterList();index=" + i + ";displayChapter(" + i + ")'>" + src.childNodes[i].getAttribute("name") + "</a><br />";
                else chapterList += "<a href='javascript:void(0);' onclick='toggleChapterList();index=" + i + ";displayChapter(" + i + ")'>" + src.childNodes[i].getAttribute("name") + "</a><br />";
            }

            document.getElementById("chapterList").innerHTML = chapterList;
        }



        function toggleChapterList() {
            var list = document.getElementById("chapterList");
            if (list.style.display == "block") list.style.display = "none";
            else list.style.display = "block";
        }


        function toggleMenu() {
            var list = document.getElementById("menu");
            if (list.style.display == "block") list.style.display = "none";
            else list.style.display = "block";
        }


        function displayChapter(c) {
            scrollTo(0, 0);
            var srcImgs = src.childNodes[c].childNodes;
            var html = "<center><h1>" + src.childNodes[c].getAttribute("name") + "</h1>";
            var nav = "";
            if (c == 0) nav += "<p class='nav'>&lt;&lt; Previous&nbsp;&nbsp;&nbsp;";
            else nav += "<a class='nava' href='javascript:void(0);' onclick='displayPreviousChapter()'>&lt;&lt; Previous</a>&nbsp;&nbsp;&nbsp;";
            nav += "<a class='nava' href='javascript:void(0);' onclick='toggleChapterList()'>Chapter list</a>&nbsp;&nbsp;&nbsp;";
            if (c + 1 == src.childNodes.length) nav += "Next &gt;&gt;</p>";
            else nav += "<a class='nava' href='javascript:void(0);' onclick='displayNextChapter()'>Next &gt;&gt;</a></p>";
            html += nav;
            for (var i = 0; i < srcImgs.length; i++) { html += '<img src="' + srcImgs[i].value + '" />'; }
            html += nav + "</center>";
            document.getElementById("displayer").innerHTML = html; buildChapterList();
        }


        function displayNextChapter() {
            index++; if (src == undefined) return;
            if (src.childNodes.length == index) { index = src.childNodes.length - 1; return; } displayChapter(index);
        }


        function displayPreviousChapter() {
            index--; if (src == undefined) return;
            if (index == -1) { index = 0; return; } displayChapter(index);
        }


        function startSlider() {
            stopSlider(); slider = setTimeout(slide, delay);
        }


        function stopSlider() {
            clearTimeout(slider); clearTimeout(glider);
        }


        function slide() {
            if (document.documentElement.scrollTop + document.documentElement.clientHeight < document.documentElement.scrollHeight)
                scrollBy(0, document.documentElement.clientHeight * 2 / 3);
            slider = setTimeout(slide, delay);
        }


        function pageDown() {
            if (document.documentElement.scrollTop + document.documentElement.clientHeight >= document.documentElement.scrollHeight)
            { displayNextChapter(); return true; }
            return false;
        }


        function pageUp() {
            if (document.documentElement.scrollTop == 0) displayPreviousChapter();
        }


        function glide() {
            scrollBy(0, document.documentElement.clientHeight / 40);
            glideDistance += document.documentElement.clientHeight / 40;
            if (glideDistance >= document.documentElement.clientHeight * 2 / 3) { clearTimeout(glider); return; }
            glider = setTimeout(glide, 10);
        }


        function setDelay(t) { delay = t * 1000; }


        function hookKeyboardEvents(e) {
            var key_code = (window.event) ? event.keyCode : e.which;

            if (key_code == kc.fkey || key_code == kc.skey) { toggleChapterList(); }
            else if (key_code == km.fkey || key_code == km.skey) { toggleMenu(); }
            else if (key_code == kn.fkey || key_code == kn.skey) { displayNextChapter(); }
            else if (key_code == kv.fkey || key_code == kv.skey) { displayPreviousChapter(); }
            else if (key_code == ks.fkey || key_code == ks.skey) { toggleSlide(); }
        }


        window.document.onkeydown = hookKeyboardEvents;


        function bindHotkey(k, i, c) {
            if (k == "c") {
                if (i == 0) kc.fkey = c;
                else kc.skey = c;
            }
            else if (k == "m") {
                if (i == 0) km.fkey = c; else km.skey = c;
            }
            else if (k == "n") {
                if (i == 0) kn.fkey = c; else kn.skey = c;
            }
            else if (k == "v") { if (i == 0) kv.fkey = c; else kv.skey = c; }
            else if (k == "s") { if (i == 0) ks.fkey = c; else ks.skey = c; }
        }


        function toggleSlide() {
            if (document.getElementById("cbDisable").checked) stopSlider(); else { startSlider(); }
        }


        function changeDelay() {
            var delay = document.getElementById("txtDelay").value;
            if (isNaN(delay) || delay <= 0) { alert("Delay must be greater than zero."); }
            else { setDelay(delay); }
        }


        function changeBg(black) {
            if (black) { document.body.style["background"] = "#000"; document.body.style["color"] = "#fff"; }
            else { document.body.style["background"] = "#fff"; document.body.style["color"] = "#000"; }
        }

    </script>
    <title>MangaReader</title>
</head>
<body>
    <h2>
        MangaReader
    </h2>
    <p>
        Press M to open/close the Menu.
    </p>
    <div id="menu">
        Background
        <label>
            <input type="radio" id="cbBlack" name="bg" onclick="changeBg(true);" /> Black
        </label>
        <label>
            <input type="radio" name="bg" onclick="changeBg(false);" checked="checked" /> White
        </label>
    </div>
    <div id='chapterList'>
    </div>
    <div id="displayer">
    </div>
    <script>
        bindHotkey('c', 0, '81');
        bindHotkey('c', 1, '67');
        bindHotkey('m', 0, '87');
        bindHotkey('m', 1, '77');
        bindHotkey('n', 0, '82');
        bindHotkey('n', 1, '78');
        bindHotkey('v', 0, '69');
        bindHotkey('v', 1, '86');
        bindHotkey('s', 0, '83');
        bindHotkey('s', 1, '66');
        display("<div name='\\'><input value='file:///E:/Images/MEME/01-how-about-no-bear.jpg' /><input value='file:///E:/Images/MEME/1013631_989602041055563_2119088979308182222_n.jpg' /><input value='file:///E:/Images/MEME/10245318_794871287237712_5437804938827351618_n.jpg' /><input value='file:///E:/Images/MEME/10256472_788541321199365_2317390516132444768_n.jpg' /><input value='file:///E:/Images/MEME/10276977_691014181012777_1321903578060637223_n.jpg' /><input value='file:///E:/Images/MEME/10342000_794871483904359_1228475938747476294_n.jpg' /><input value='file:///E:/Images/MEME/10358555_795954470461548_3731241441416242698_n.jpg' /><input value='file:///E:/Images/MEME/10390217_4933731396775_5625873678251059843_n.jpg' /><input value='file:///E:/Images/MEME/10394828_640051109437252_2700124488661858369_n.jpg' /><input value='file:///E:/Images/MEME/10404864_732173103526054_4419416784161095294_n.jpg' /><input value='file:///E:/Images/MEME/10408819_686668294782213_2503576443677489995_n.jpg' /><input value='file:///E:/Images/MEME/10420330_773604832713496_5229701082923523790_n.jpg' /><input value='file:///E:/Images/MEME/10428415_773604546046858_6009884531272472377_n.jpg' /><input value='file:///E:/Images/MEME/10439405_794871157237725_6933532781815364292_n.jpg' /><input value='file:///E:/Images/MEME/10472772_10152577960096840_3341555464468959358_n.jpg' /><input value='file:///E:/Images/MEME/10481976_201633596674012_3618867796999042067_o.jpg' /><input value='file:///E:/Images/MEME/10613143_794871193904388_6613852214667757313_n.jpg' /><input value='file:///E:/Images/MEME/10629722_729675113754865_3140203081148983194_n.jpg' /><input value='file:///E:/Images/MEME/10639641_362945773886499_7030988351686437275_n.jpg' /><input value='file:///E:/Images/MEME/10645154_660122937426981_6510969488177396695_n.jpg' /><input value='file:///E:/Images/MEME/10704179_1536524113258209_2946124996886071364_n.jpg' /><input value='file:///E:/Images/MEME/10801828_722966711113360_8080474135835751062_n.jpg' /><input value='file:///E:/Images/MEME/10846087_777477535679401_27326740918504565_n.jpg' /><input value='file:///E:/Images/MEME/10846478_213044052215203_4074078553770585457_n.jpg' /><input value='file:///E:/Images/MEME/10857897_639393842836515_8958541881020868847_n.jpg' /><input value='file:///E:/Images/MEME/12795_396188453891310_556125280993557632_n.jpg' /><input value='file:///E:/Images/MEME/1308079089001.png' /><input value='file:///E:/Images/MEME/1310428654001.png' /><input value='file:///E:/Images/MEME/1377414_727481787328519_433280418821447766_n.jpg' /><input value='file:///E:/Images/MEME/1379350_820525184675632_4210587346686289250_n.jpg' /><input value='file:///E:/Images/MEME/1394342_631905963581873_8215940236986303506_n.jpg' /><input value='file:///E:/Images/MEME/1454829_691500757623696_973263219422015826_n.jpg' /><input value='file:///E:/Images/MEME/1467228_285273885004636_1430192833790471830_n.jpg' /><input value='file:///E:/Images/MEME/1487347_729675307088179_4085002619147998384_n.jpg' /><input value='file:///E:/Images/MEME/1559637_765636386864513_5207917206363915465_n.jpg' /><input value='file:///E:/Images/MEME/1601528_794871573904350_6609685699497375604_n.jpg' /><input value='file:///E:/Images/MEME/1604696_1499744066934372_372768744083251892_n.jpg' /><input value='file:///E:/Images/MEME/1604869_899548666729630_6245500138295425100_n.jpg' /><input value='file:///E:/Images/MEME/2-panel-forever-alone-computer-blank.jpg' /><input value='file:///E:/Images/MEME/334072_154303948006374_142488995854536_152404_1059755959_o.jpg' /><input value='file:///E:/Images/MEME/339041_154303974673038_142488995854536_152405_933585915_o.jpg' /><input value='file:///E:/Images/MEME/37024960.jpg' /><input value='file:///E:/Images/MEME/375630_10201122089111682_1917960480_n.jpg' /><input value='file:///E:/Images/MEME/379849_154310694672366_142488995854536_152425_962166314_n.jpg' /><input value='file:///E:/Images/MEME/380389_154305918006177_142488995854536_152418_1690989430_n.jpg' /><input value='file:///E:/Images/MEME/382776_154311808005588_142488995854536_152431_465324822_n.jpg' /><input value='file:///E:/Images/MEME/384998_156621847774584_142488995854536_157583_1999310313_n.jpg' /><input value='file:///E:/Images/MEME/386428_154310728005696_142488995854536_152426_2136949633_n.jpg' /><input value='file:///E:/Images/MEME/388361_154304001339702_142488995854536_152406_1003916549_n.jpg' /><input value='file:///E:/Images/MEME/390242_154304974672938_142488995854536_152413_1218481462_n.jpg' /><input value='file:///E:/Images/MEME/392633_156361987800570_142488995854536_157150_815608423_n.jpg' /><input value='file:///E:/Images/MEME/393626_154311764672259_142488995854536_152428_1202433524_n.jpg' /><input value='file:///E:/Images/MEME/395345_154305944672841_142488995854536_152420_548891049_n.jpg' /><input value='file:///E:/Images/MEME/397396_154307201339382_142488995854536_152422_1987669617_n.jpg' /><input value='file:///E:/Images/MEME/397534_154304031339699_142488995854536_152408_1280802475_n.jpg' /><input value='file:///E:/Images/MEME/399910_154311804672255_142488995854536_152430_1059377320_n.jpg' /><input value='file:///E:/Images/MEME/400396_154311788005590_142488995854536_152429_292808918_n.jpg' /><input value='file:///E:/Images/MEME/401360_154303918006377_142488995854536_152403_266826335_n.jpg' /><input value='file:///E:/Images/MEME/403692_154305928006176_142488995854536_152419_347415911_n.jpg' /><input value='file:///E:/Images/MEME/404581_154307184672717_142488995854536_152421_1935852172_n.jpg' /><input value='file:///E:/Images/MEME/405227_154304988006270_142488995854536_152414_2040632640_n.jpg' /><input value='file:///E:/Images/MEME/405368_154304011339701_142488995854536_152407_383139883_n.jpg' /><input value='file:///E:/Images/MEME/406936_154304998006269_142488995854536_152415_445292732_n.jpg' /><input value='file:///E:/Images/MEME/547707_254622231312357_443174223_n.jpg' /><input value='file:///E:/Images/MEME/5569352542_8d9e80a2ca.jpg' /><input value='file:///E:/Images/MEME/5779728.jpg' /><input value='file:///E:/Images/MEME/604144_985774771436792_5811735016081976642_n.jpg' /><input value='file:///E:/Images/MEME/6d5.jpg' /><input value='file:///E:/Images/MEME/945901_794871450571029_2493768344557589639_n.jpg' /><input value='file:///E:/Images/MEME/a49A28Q_700b.jpg' /><input value='file:///E:/Images/MEME/aKzXnbZ_700b.jpg' /><input value='file:///E:/Images/MEME/All_45855e_1851556.png' /><input value='file:///E:/Images/MEME/aLQ1Lex_700b.jpg' /><input value='file:///E:/Images/MEME/amL51BV_700b.jpg' /><input value='file:///E:/Images/MEME/amLPEo4_700b.jpg' /><input value='file:///E:/Images/MEME/amX13Mj_700b_v3.jpg' /><input value='file:///E:/Images/MEME/angry-dark-stare.jpg' /><input value='file:///E:/Images/MEME/angry-desk-flip.jpg' /><input value='file:///E:/Images/MEME/angry-must-resist.jpg' /><input value='file:///E:/Images/MEME/angry-no-me-gusta.jpg' /><input value='file:///E:/Images/MEME/angry-you-win-this-time!.jpg' /><input value='file:///E:/Images/MEME/annoyed-dude-come-on.jpg' /><input value='file:///E:/Images/MEME/annoyed-im-watching-u.jpg' /><input value='file:///E:/Images/MEME/annoyed-mother-of-god.jpg' /><input value='file:///E:/Images/MEME/aNoBYO0_700b.jpg' /><input value='file:///E:/Images/MEME/aNoPjqv_700b.jpg' /><input value='file:///E:/Images/MEME/aPygBXn_700b.jpg' /><input value='file:///E:/Images/MEME/aQpZ8Mq_700b.jpg' /><input value='file:///E:/Images/MEME/are-you-serious-rage-face.jpg' /><input value='file:///E:/Images/MEME/aVQmLL2_700b_v2.jpg' /><input value='file:///E:/Images/MEME/cereal-guy-cereal-guy-big-squint.jpg' /><input value='file:///E:/Images/MEME/cereal-guy-cereal-guy-spitting.jpg' /><input value='file:///E:/Images/MEME/cereal-guy-newspaper-guy-tear.jpg' /><input value='file:///E:/Images/MEME/challenge-accepted-drunk.png' /><input value='file:///E:/Images/MEME/dafuq.jpg' /><input value='file:///E:/Images/MEME/determined-fumanchu-computer-stare.jpg' /><input value='file:///E:/Images/MEME/determined-serious-chiseled-not-okay.jpg' /><input value='file:///E:/Images/MEME/disappointed-so-close-freddie-mercury.jpg' /><input value='file:///E:/Images/MEME/double-facepalm1.jpg' /><input value='file:///E:/Images/MEME/facepalm.jpg' /><input value='file:///E:/Images/MEME/fap-meme1.jpg' /><input value='file:///E:/Images/MEME/fap-now-kiss.jpg' /><input value='file:///E:/Images/MEME/fap-schlick-schlick-female.jpg' /><input value='file:///E:/Images/MEME/female-are-you-serious-photo-u1.jpg' /><input value='file:///E:/Images/MEME/fixed+one+does+not+simply+_108afc19f05349e3e741f2427b0435af.jpg' /><input value='file:///E:/Images/MEME/forever_alone_by_foreveraloneplz.png' /><input value='file:///E:/Images/MEME/fuck-that-bitch-scared-yao.jpg' /><input value='file:///E:/Images/MEME/fuck-yeah-clean-smile.jpg' /><input value='file:///E:/Images/MEME/fuck-yeah-close-enough.jpg' /><input value='file:///E:/Images/MEME/fuck-yeah-gtfo.jpg' /><input value='file:///E:/Images/MEME/genius-meme.png' /><input value='file:///E:/Images/MEME/happy-big-smile.jpg' /><input value='file:///E:/Images/MEME/happy-cuteness-overload.jpg' /><input value='file:///E:/Images/MEME/happy-epic-win.jpg' /><input value='file:///E:/Images/MEME/happy-kitteh-smile.jpg' /><input value='file:///E:/Images/MEME/happy-never-alone.jpg' /><input value='file:///E:/Images/MEME/happy-pfftch.jpg' /><input value='file:///E:/Images/MEME/happy-smile.jpg' /><input value='file:///E:/Images/MEME/happy-thumbs-up.jpg' /><input value='file:///E:/Images/MEME/I don't wanna live.jpg' /><input value='file:///E:/Images/MEME/I_DONT_GIVE_A_FUCK.jpg' /><input value='file:///E:/Images/MEME/JesusFacepalm.jpg' /><input value='file:///E:/Images/MEME/Me Gusta.png' /><input value='file:///E:/Images/MEME/misc-got-a-badass-over-here.jpg' /><input value='file:///E:/Images/MEME/misc-milk.jpg' /><input value='file:///E:/Images/MEME/misc-so-hardcore.jpg' /><input value='file:///E:/Images/MEME/misc-spiderpman.jpg' /><input value='file:///E:/Images/MEME/Misc-true-story-realistic-l.png' /><input value='file:///E:/Images/MEME/misc-true-story.jpg' /><input value='file:///E:/Images/MEME/mother-of-god-meme.jpg' /><input value='file:///E:/Images/MEME/neutral-bad-poker-face.jpg' /><input value='file:///E:/Images/MEME/neutral-concentrated.jpg' /><input value='file:///E:/Images/MEME/neutral-suspicious.jpg' /><input value='file:///E:/Images/MEME/neutral-whyyyyy.jpg' /><input value='file:///E:/Images/MEME/NothingToDoHereBlackWithTextSS.png' /><input value='file:///E:/Images/MEME/orly.jpg' /><input value='file:///E:/Images/MEME/rage-mega-rage.jpg' /><input value='file:///E:/Images/MEME/rage-super-rage.jpg' /><input value='file:///E:/Images/MEME/rage-unhappy-l.png' /><input value='file:///E:/Images/MEME/ragecomic.png' /><input value='file:///E:/Images/MEME/rainbowMeme.PNG' /><input value='file:///E:/Images/MEME/sad-crying.jpg' /><input value='file:///E:/Images/MEME/shut-up-money.jpg' /><input value='file:///E:/Images/MEME/surprised-long-neck-surprise.jpg' /><input value='file:///E:/Images/MEME/sweetjesus.jpg' /><input value='file:///E:/Images/MEME/Too-damn-high.jpg' /><input value='file:///E:/Images/MEME/troll-gay.jpg' /><input value='file:///E:/Images/MEME/troll-melvin.jpg' /><input value='file:///E:/Images/MEME/troll-sad-troll-face.jpg' /><input value='file:///E:/Images/MEME/troll-troll-crazy-insane.jpg' /><input value='file:///E:/Images/MEME/troll-troll-hot-chick.jpg' /><input value='file:///E:/Images/MEME/troll-trollol.jpg' /><input value='file:///E:/Images/MEME/trollface.jpg' /><input value='file:///E:/Images/MEME/TrollFace.png' /><input value='file:///E:/Images/MEME/tumblr_ldp3jukzHo1qb9a2wo1_500.png' /><input value='file:///E:/Images/MEME/tumblr_lltzgnHi5F1qzib3wo1_400.jpg' /><input value='file:///E:/Images/MEME/tumblr_lol4n7BvXj1qbolbn.jpg' /><input value='file:///E:/Images/MEME/tumblr_mn9oowcHcf1r0y8rho2_400.jpg' /><input value='file:///E:/Images/MEME/tumblr_mot6wp2ULr1srgwgzo1_400.jpg' /><input value='file:///E:/Images/MEME/Untitled-1 (1).jpg' /><input value='file:///E:/Images/MEME/worried-challenge-denied!.jpg' /><input value='file:///E:/Images/MEME/worried-me-culpa.jpg' /><input value='file:///E:/Images/MEME/You don't say.jpg' /><input value='file:///E:/Images/MEME/yuno.png' /><input value='file:///E:/Images/MEME/[Share99-net] Anh-comment-facebook-doc-2 (49).jpg' /></div>");
    </script>
</body>
</html>